package com.sxt;

import java.awt.*;

public class Gold extends Object{       //Gold类继承Object父类

    boolean flag = false;
    Gold(){
        this.x=(int) (Math.random()*650) ;     //Math.random()随机数   *650是防止金块生成在边上
        this.y=(int) (Math.random()*400+350);  //Math.random()随机数   *400+350（350~750） 是防止金块生成在天上
        this.width=52;
        this.height=52;
        this.flag=false;//初始值为false
        this.m = 35;//质量
        this.count=4;//普通金块积分
        this.type=1;//金块
        this.img = Toolkit.getDefaultToolkit().getImage("C:/Users/mmq/IdeaProjects/The Gold Miner/imgs/gold1.gif");
    }
}


class GoldMini extends Gold{
    GoldMini(){
        this.width=36;
        this.height=36;
        this.m=15;
        this.count=2;//小金块2分
        this.img = Toolkit.getDefaultToolkit().getImage("C:/Users/mmq/IdeaProjects/The Gold Miner/imgs/gold0.gif");
    }
}
//GoldPlus类继承Gold类
class GoldPlus extends Gold{
    GoldPlus(){
        this.x=(int) (Math.random()*550) ;
        this.width=80;
        this.height=80;
        this.m=60;
        this.count=8;//大金块8分
        this.img = Toolkit.getDefaultToolkit().getImage("C:/Users/mmq/IdeaProjects/The Gold Miner/imgs/gold2.gif");
    }
}
